package main

import (
	"fmt"
	"sync"
)

var wg sync.WaitGroup

func say_hello(i int) {
	fmt.Println("say_hello", i)
	defer wg.Done()
}

func main() {
	for i := 0; i < 10; i++ {
		wg.Add(1)
		go say_hello(i)
	}
	fmt.Println("say_main")
	wg.Wait()
}
